@import '../../var.less';

.box {
  display: flex;
  height: 100vh;
}

.asideBox {
  position: relative;
  width: 250px;
  background-color: var(--color-bg-200);
  overflow: hidden;
  transition: width 0.2s background 0.3s;
}

.aside {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-width: 250px;
  height: 100%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;

  .header {
    flex-shrink: 0;
  }

  .tree {
    flex: 1;
    overflow: auto;
    ::-webkit-scrollbar {
      display: none;
    }
  }
}

.main {
  width: 0px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.header {
  margin: 10px 10px 0px 10px;
}

.overview {
  margin: 0px 5px;
  display: flex;
  align-items: center;
  margin-top: 8px;
  height: 24px;
  border-radius: 2px;
  padding: 0px 10px;
  i {
    font-size: 16px;
    margin-right: 8px;
  }
  // &:hover{
  //   color: var(--custom-primary-color);
  //   background-color: var(--custom-primary-1);
  // }
}

.currentNameBox {
  height: 28px;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  cursor: pointer;
  font-weight: 500;
  &:hover {
    color: var(--custom-primary-color);
  }
}

.databaseName {
  font-size: 18px;
  margin: 0 10px;
  .f-single-line();
}

.DBLogo {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background-position: 50%;
  background-size: cover;
}

.switchDBItem {
  display: flex;
  align-items: center;
  width: 100%;
  .DBLogo {
    width: 20px;
    height: 20px;
    margin-right: 10px;
  }
  .DBName {
    flex: 1;
    .f-single-line();
  }
}

.searchBox {
  width: 100%;
  display: flex;
  .inputBox {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    margin-right: 4px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    i {
      position: absolute;
      left: 5px;
      top: 50%;
      transform: translateY(-50%);
      margin-right: 10px;
    }
  }

  input {
    display: block;
    margin-left: 24px;
    flex: 1;
    box-shadow: none !important;
    padding: 0;
    border: none;
    outline: none;
    background-color: transparent;
  }

  .button {
    margin: 0px 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    background-color: var(--custom-primary-color);
    &:hover {
      filter: brightness(1.1);
    }
    i {
      color: var(--color-bg-100);
    }
  }
  .refresh {
  }

  .create {
  }
}

.footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0px 10px 0px 0px;
  border-top: 1px solid var(--color-border);
  height: 30px;
  background-color: var(--color-bg-200);
}

.reversalIconBox {
  transform: rotate(180deg);
}

.iconBox {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2px;
  font-size: 13px;
  height: 24px;
  width: 24px;
  &:hover {
    cursor: pointer;
    background-color: var(--color-bg-hover);
  }
}

.commandSearchResult {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2px 4px 2px 15px;
  height: 24px;
  user-select: none;
  position: relative;
  border-radius: 4px;
  i {
    font-size: 13px;
    margin-left: 4px;
    transform: rotate(270deg);
  }
  &:hover {
    cursor: pointer;
    background-color: var(--color-bg-hover);
  }
  &::after {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 99px;
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--custom-success-color-outline);
  }
}

.unfoldSearchResult {
  i {
    transform: rotate(90deg);
  }
  &::after {
    background-color: var(--custom-success-color);
  }
}
